# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dirble
pkgver=1.4.2
pkgrel=1
epoch=1
pkgdesc='Fast directory scanning and scraping tool.'
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
arch=('x86_64' 'aarch64')
url='https://github.com/nccgroup/dirble'
license=('GPL3')
makedepends=('cargo')
depends=('curl')
source=("$pkgname::https://github.com/nccgroup/dirble/archive/v$pkgver.tar.gz")
sha512sums=('SKIP')


build() {
  cd "$pkgname-$pkgver"

  cargo build --release
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md CHANGELOG.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  install -dm 755 "$pkgdir/usr/share/$pkgname"
  install -Dm 644 dirble_wordlist.txt "$pkgdir/usr/share/$pkgname/dirble_wordlist.txt"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/extensions/" extensions/*
}

